
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>物业管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <link rel="icon" th:href="@{/images/favicon.ico}" type="image/x-icon"/>
    <meta name="format-detection" content="telephone=no">
    <script type="text/javascript" th:src="@{lib/loading/okLoading.js}"></script>
    <link rel="stylesheet" th:href="@{/css/main.css}" media="all">
    <link rel="stylesheet" th:href="@{/css/font.css}">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
</head>
<style>
    .show_list{display: block;}
    .hide_lits{display: none;}
</style>
<body>

<div class="layui-layout layui-layout-admin">
    <div class="layui-header header header-demo">
        <div class="layui-main">
            <div class="admin-logo-box">
            <a th:href="@{/index}">
                <img th:src="@{/images/logo.png}"
                     class="logo" width="128px" height="128px" style="float: left; margin-top: -45px ">
            </a>
                <div class="larry-side-menu">
                    <img th:src="@{/images/ss.png}" width="44px" height="44px" alt="">
                </div>
            </div>
            <ul class="layui-nav" lay-filter="">
                <li class="layui-nav-item" id="time" style="margin-right: 50px;font-weight: 300;font-size: 16px;color: #fff;position: absolute;left: -250px;top: 0"></li>
                <li class="layui-nav-item"><img th:src="${session.sysUser.avatar}" class="layui-circle" width="35px" height="35px" alt=""></li>



                <li class="layui-nav-item"> <a href="javascript:;">[[${session.sysUser.name}]]</a>
                    <dl class="layui-nav-child">
                        <!-- 二级菜单 -->
                        <dd><a href="javascript:;"  onclick="one_set('个人信息','one_set.html','1000','600')">个人信息</a>
                        </dd>
                        <dd><a href="javascript:;" onclick="logout()">切换帐号</a></dd>
                        <dd><a href="javascript:;" onclick="logout()">退出</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item x-index"><a href="#"></a></li>
            </ul>
        </div>
    </div>

    <!--左侧导航区域-->


    <div class="layui-side layui-bg-black x-side show_list" style="left:0px;" id="table1">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree site-demo-nav" lay-filter="side">
                <li class="layui-nav-item layui-this">
                    <a th:href="@{/welcome}">
                        <i class="fa fa-university" lay-tips="首页"></i><cite>控制台</cite>
                    </a>
                </li>
                <li class="layui-nav-item" th:each="category,var:${list}" th:if="${category.parentId==0}">
                    <a class="javascript:;" href="javascript:;">
                        <i th:class="${category.icon}" style="top: 3px;font-size:21px"></i><cite th:text="${category.categoryName}"></cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd th:each="child,count:${category.child}" th:if="${child.getParentId==category.categoryId and child.address != '/activity_list'}">
                            <a th:href="${child.address}">
                                <cite th:text="${child.categoryName}"></cite>
                            </a>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>



    <div class="layui-tab layui-tab-card site-demo-title x-main" lay-filter="x-tab" lay-allowclose="true" style="left: 220px;border-left: solid 2px #2299ee;">
        <ul class="layui-tab-title">
            <li class="layui-this"> 我的桌面 <i class="layui-icon layui-unselect layui-tab-close">ဆ</i> </li>
        </ul>
        <div class="layui-tab-content site-demo site-demo-body">
            <div class="layui-tab-item layui-show">
                <iframe frameborder="0" th:src="@{/welcome}" class="x-iframe"></iframe>
            </div>
        </div>
    </div>
    <div class="site-mobile-shade"> </div>
</div>

<script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
<script th:src="@{/js/main.js}"></script>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/x-layui.js}" charset="utf-8"></script>

<script>
    $(".daohang").click(function(){
        var table = $(this).attr("ids");
        var ids = $(".show_list").attr("id");
        $("#"+ids+"").addClass("hide_lits");
        $("#"+ids+"").removeClass("show_list");
        $(""+table+"").removeClass("hide_lits");
        $(""+table+"").addClass("show_list");
    })


</script>
<script>
    layui.use(['laydate','element','laypage','layer'], function(){
        $ = layui.jquery;//jquery
        laydate = layui.laydate;//日期插件
        lement = layui.element();//面包导航
        laypage = layui.laypage;//分页
        layer = layui.layer;//弹出层
        okLoading.close($)
        //以上模块根据需要引入

    });
    /**
     * 退出登陆
     * 2019年8月17日19:43:15
     */
    function logout() {
        location.href="/logout"
    }

    function one_set(title,url,w,h){
        x_admin_show(title,url,w,h);
    }
</script>
<script>
    //顶部时间
    function getTime(){
        var myDate = new Date();
        var myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
        var myMonth = myDate.getMonth()+1; //获取当前月份(0-11,0代表1月)
        var myToday = myDate.getDate(); //获取当前日(1-31)
        var myDay = myDate.getDay(); //获取当前星期X(0-6,0代表星期天)
        var myHour = myDate.getHours(); //获取当前小时数(0-23)
        var myMinute = myDate.getMinutes(); //获取当前分钟数(0-59)
        var mySecond = myDate.getSeconds(); //获取当前秒数(0-59)
        var week = ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
        var nowTime;

        nowTime = myYear+'-'+fillZero(myMonth)+'-'+fillZero(myToday)+'&nbsp;&nbsp;'+week[myDay]+'&nbsp;&nbsp;'+fillZero(myHour)+':'+fillZero(myMinute)+':'+fillZero(mySecond);
        //console.log(nowTime);
        $('#time').html(nowTime);
    };
    function fillZero(str){
        var realNum;
        if(str<10){
            realNum	= '0'+str;
        }else{
            realNum	= str;
        }
        return realNum;
    }
    setInterval(getTime,1000);
</script>
<script>
    window.onload=function () {
        var click=document.getElementById('new-nav');
        var news=document.getElementById('news');
        click.addEventListener('mousemove',function () {
            news.style.display='block';
        });
        click.addEventListener('mouseout',function () {
            news.style.display='none';
        });

        var gonggao=document.getElementById('gonggao');
        var gonggaos=document.getElementById('gonggaos');
        gonggao.addEventListener('mousemove',function () {
            gonggaos.style.display='block';
        });
        gonggao.addEventListener('mouseout',function () {
            gonggaos.style.display='none';
        });
    }
</script>
</body>
</html>